Component({
  properties: {
    showSignup: {
      type: Boolean,
      value: true,
    },
    isSignUp: {
      type: Boolean,
      value: false,
    }
  },
  data: {
    paddingBottom: 0,
    layout: [
      {
        icon: "share",
        event: "share",
        desc: "分享",
        openType: "share"
      },
      {
        event: "favorite",
        icon: "favorite",
        desc: "收藏"
      }
    ]
  },
  methods: {
    buttonTap: function (e) {
      const event_name = e.currentTarget.dataset.event;
      this.triggerEvent(event_name, e)
    },
    signup: function (e) {
      this.triggerEvent("signup", e)
    },
    toSuccess() {
      this.triggerEvent("success");
    }
  },
  lifetimes: {
    attached() {
      const info = wx.getSystemInfoSync();
      this.setData({
        paddingBottom: info.screenHeight - info.safeArea.bottom
      })
    }
  }
});
